<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<body>
<div class="EpmsSubTitle"><p><b>股市行情</b></p>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
  <tr>
	  <td class=EpmsTdTitle>期数</td>
	  <td class=EpmsTdTitle>开盘价</td>
	  <td class=EpmsTdTitle>收盘价</td>
	  <td class=EpmsTdTitle>最高价</td>
	  <td class=EpmsTdTitle>最低价</td>
	  <td class=EpmsTdTitle>现价</td>
	  <td class=EpmsTdTitle>交易量</td>
	  <td class=EpmsTdTitle>时间</td>
	  <td class=EpmsTdTitle>操作</td>
	  
  </tr>
	<c:forEach var="stock" items="${page.result }">
		<tr>
		    <td class=EpmsTdNoColor >${stock.periods }</td>
		    <td class=EpmsTdNoColor >${stock.openingPrice }</td>
			<td class=EpmsTdNoColor >${stock.closingPrice }</td>
			<td class=EpmsTdNoColor >${stock.highestPrice }</td>
		    <td class=EpmsTdNoColor >${stock.bottomPrice }</td>
			<td class=EpmsTdNoColor>${stock.currentPrice }</td>
			<td class=EpmsTdNoColor>${stock.tradingCapacity }</td>
		    <td class=EpmsTdNoColor>
		    	<fmt:formatDate value="${stock.createDate}" pattern="yyyy-M-dd HH:mm:ss"/>
		    </td>
			<td class=EpmsTdNoColor align="center" class="vv">
				<a href="${ctx}/admin/updateStockConfPage.action?periods=${stock.periods}">修改</a>
			</td>
		</tr>
	</c:forEach>
	<tr>
		<td class="EpmsTdNoColor" colspan="9" align="right">
		第${page.pageNo}页&nbsp;&nbsp;
			<c:choose>
			<c:when test="${page.pageNo >1}">
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="frontpage(${page.pageNo-1})">上一页</span>&nbsp;
				</a>
			</c:when>
			<c:otherwise>
				上一页 &nbsp;
			</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${page.totalPageCount > page.pageNo}">	
					<a href="javascript:void(0);" style="text-decoration: none;">
						<span onclick="nextpage(${page.pageNo+1})">下一页</span> &nbsp;
					</a>
				</c:when>
				<c:otherwise>
					下一页&nbsp;
				</c:otherwise>
			</c:choose>
			&nbsp;共${page.totalPageCount }页
		</td>
	</tr>
	<tr>
		<td align="center" class="EpmsTdNoColor" colspan="2">
			<div class="EpmsButtonDiv">
				<input name="button" class="inputSubmit" id="button" onclick="window.location.href='${ctx}/admin/updateStockConfPage.action'" type="submit" value="添加"/>
			</div>
		</td>
	</tr>
</table>
</body>
<script type="text/javascript">
function frontpage(pageNo){
	location = "${ctx}/admin/stockConfPage.action?pageNo="+pageNo;
}

function nextpage(pageNo){
	location = "${ctx}/admin/stockConfPage.action?pageNo="+pageNo;
}
</script>